// 将文本自动转为p标签
export const getTextHTML = (str: string) => {
  let arr = str.split('\n');
  let newStr = '';
  arr.forEach((item) => {
    newStr += `<p>${item}</p>`;
  });

  return newStr;
};
// 给每个p标签设置下外边距
export const marginBtm = (dom: any) => {
  let arr = dom.childNodes;
  arr.forEach((el) => {
    if (el.nodeType !== 1) return;
    el.style.marginBottom = '20px';
  });
};
